class Date {
    public int year;
    public int month;
    public int day;

    public void setDate(int y, int m, int d) {
        this.year = y;
        this.month = m;
        this.day = d;
    }
    public static void printDate() {
        System.out.println();
    }
}
public class Test {
    public static int add(int x, int y) {
        return x+y;
    }
    public static double add(double x, double y) {
        return x+y;
    }
    public static int factor(int n) {
        if(n==1) {
            return 1;
        }
        return n * factor(n-1);
    }
    public static void printSplit(int n) {
        if(n > 9) {
            printSplit(n / 10);
        }
        System.out.print(n % 10 + " ");
    }

    public static void main(String[] args) {
        int a = 10;
        int b = 20;
        double c = 1.1;
        double d = 1.2;
        System.out.println(add(a, b));
        System.out.println(add(c, d));

        System.out.println(factor(6));
        printSplit(6517);
        System.out.println();

        Date date1 = new Date();
        Date date2 = new Date();
        Date date3 = new Date();
        date1.setDate(2022,10,25);
        date2.setDate(2022,10,25);
        date3.setDate(2022,10,25);
    }
}